#include "WhyTime.h"

WhyTime::WhyTime()
{
	start.QuadPart = 0;
	end.QuadPart = 0;
	deltatime = 0;
	QueryPerformanceFrequency(&frequency);
}

void WhyTime::Start()
{
	QueryPerformanceCounter(&start);
}

void WhyTime::End()
{
	QueryPerformanceCounter(&end);

	LARGE_INTEGER time;
    time.QuadPart = end.QuadPart - start.QuadPart;
	deltatime = ((double)time.QuadPart / (double)frequency.QuadPart);
}